package com.mida.dms.knw.vo;

import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

/**
 * 下拉菜单VO
 */
@Setter
@Getter

@AllArgsConstructor
@NoArgsConstructor
public class PullDownMenuVO {

    /**
     * code
     */
    @JsonSerialize(using= com.fasterxml.jackson.databind.ser.std.ToStringSerializer.class)
    private Long code;

    /**
     * value
     */
    private String value;

    /**
     * value
     */
    private String id;

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

       PullDownMenuVO that = (PullDownMenuVO) o;

        if (code != null ? !code.equals(that.code) : that.code != null) return false;
        if (value != null ? !value.equals(that.value) : that.value != null) return false;
        return id != null ? id.equals(that.id) : that.id == null;
    }

    @Override
    public int hashCode() {
        int result = code != null ? code.hashCode() : 0;
        result = 31 * result + (value != null ? value.hashCode() : 0);
        result = 31 * result + (id != null ? id.hashCode() : 0);
        return result;
    }
}


